package test1225;

public class Test08 {
    public static void main(String[] args) {
        // 打印数组中的所有质数
        int[] arr = {11, 12, 13, 14, 15, 16, 17};
        m08(arr);
    }
    public static void m08(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            int num = arr[i];
            boolean x = true;
            if (num <= 1) {
                x = false;
            }
            for (int j = 2; j <= Math.sqrt(num); j++) {
                if (num % j == 0) {
                    x = false;
                    break;
                }
            }

            if (x) {
                System.out.println(num);
            }
        }}}





